#include <time.h>
#include "config.h"

char timestring[500 ];

char *clock_getcurrenttime() {
  time_t t;
  struct tm *tmp;
  
  t = time(NULL);
  tmp = localtime(&t);
  
  strftime(timestring, sizeof(timestring), CLOCK_FORMAT, tmp);

  return timestring;
}

void clock_get_time(char *buffer, size_t maxsize) {
  time_t t;
  struct tm *tmp;

  t = time(NULL);
  tmp = localtime(&t);

  strftime(buffer, maxsize, CLOCK_FORMAT, tmp);
}
  
